import java.util.Scanner;

public class Test {
    public static void main(String[]args){
        Scanner scanner = new Scanner (System.in);
        int n = scanner.nextInt();
       int ret = Fib(n);
        System.out.println(ret);
    }
    public static int Fib(int n){
        int a = 1;
        int b = 1;
        int c = 1;
        if(n==0){
            return 0;
        } if(n==1||n==2){
            return 1;
        }for(int i =2;i<=n;i++){

            c=a+b;
            a=c;
            b=a;

        }
        return c;
    }

    public static void main8(String[] args) {
        int a = 10;
        int b = 20;
        int ret1 = max(a,b);
        System.out.println("ret1 = "+ret1);
        double a1 = 2.5;
        double b1 = 3.5;
        double c1 = 4.5;
        double ret2 = max(a1,b1,c1);
        System.out.println("ret2 = "+ret2);
    }
    public static int max(int a,int b){
        if(a>b){
            return a;
        }else{
            return b;
        }
    }
    public static double max(double a1,double b1,double c1){
        double c = a1>b1?a1:b1;
        return c>c1?c:c1;
    }




    public static void main7(String[] args) {
        int a = 10;
        int b = 20;
        int ret1 = addInt(a,b);
        System.out.println("ret1="+ret1);
        double A = 2.5;
        double B = 3.2;
        double C = 1.3;
        double ret2 = addDouble(A,B,C);
        System.out.println("ret2 ="+ret2);
        }

    public static int addInt(int a,int b){
        return a+b;
    }
    public static double addDouble(double A,double B,double C){
        return A+B+C;
    }


    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = 1;
        int sum = 0;
        for(int i=1;i<=n;i++){
            ret*=i;
            sum+=ret;
        }
        System.out.println(sum);
    }
    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 0;
        int j = 0;
        for(i=0;i<n;i++){
            for(j=0;j<n;j++){
                if(i==j||j+i==n-1){
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();

        }
    }
    public static void main4(String[] args) {
        int a = 10;
        int b = 20;
        int c = 30;
        int ret = max2(a,b);
       int ret2 = max3(ret,c);
        System.out.println(ret2);
    }
    public static int max2(int a,int b){
        if(a>b){
           return a; //System.out.println("最大值为："+a);
        }else{
          return b;  //System.out.println("最大值为："+b);
        }
    }
    public static int max3(int ret,int c){
        if(ret>c){
            return ret;
        }else{
            return c;
        }
    }


    public static void main3(String[] args) {
        int i = 0;
        double sum = 0;
        int flag = 1;
        for(i=1;i<=100;i++){
            sum = sum+flag*(1.0/i);
            flag = -flag;
        }
        System.out.println(sum);
    }
    public static void main2(String[] args) {
        int i = 0;
        double sum = 0;
        for(i=1;i<=100;i++){
            sum+=1.0/i-1.0/(i+1);
        }
        System.out.println(sum);
    }
    public static void main1(String[] args) {

      // 计算1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 的值    。
        int i = 0 ;
       double a = 0;
        double b = 0;
        double c = 0;
       double sum = 0;
        for(i=1;i<101;i++){
            if(i%2!=0){
                a = -1.0/i;
            }else{
                b = 1.0/i;
            }
            c += a+b;
           // sum +=c;
    }
        System.out.println(c);

    }

}
